<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;


// www.aq.com/public/

// 测试
Route::get('api/:version/index', 'api/:version.Index/index');
Route::post('api/:version/create', 'api/:version.Index/create');

// 小程序
// POST  xx/api/v1/webapp/cookie
Route::post('api/:version/webapp/cookie', 'api/:version.Webapp/get_cookie');


// 练习
//  GET  xx/api/v1/practice/question/1
Route::get('api/:version/practice/question/:type', 'api/:version.Practice/get_question');
//  POST  xx/api/v1/practice/question
Route::post('api/:version/practice/question', 'api/:version.Practice/answer_question');


// 错误
//  GET  xx/api/v1/mistake/question
Route::get('api/:version/mistake/question', 'api/:version.Mistake/get_question');
//  POST  xx/api/v1/mistake/question
Route::post('api/:version/mistake/question', 'api/:version.Mistake/answer_question');
//  DELETE  xx/api/v1/mistake/question:id
Route::post('api/:version/mistake/question/:id', 'api/:version.Mistake/del_question');




// 收藏
//  GET  xx/api/v1/collection/question
Route::get('api/:version/collection/question', 'api/:version.Collection/get_question');
//  POST  xx/api/v1/collection/question/answer
Route::post('api/:version/collection/question/answer', 'api/:version.Collection/answer_question');
//  POST  xx/api/v1/collection/question
Route::post('api/:version/collection/question', 'api/:version.Collection/add_question');
//  DELETE  xx/api/v1/collection/question:id
Route::delete('api/:version/collection/question/:id', 'api/:version.Collection/del_question');




// 排行榜
//  GET  xx/api/v1/Ranking
Route::get('api/:version/Ranking', 'api/:version.Ranking/index');


// 测试
//  GET  xx/api/v1/Exam/confirm/:type
Route::get('api/:version/Exam/confirm/:type', 'api/:version.Exam/get_confirm');
//  GET  xx/api/v1/Exam/random/:type
Route::get('api/:version/Exam/random/:type', 'api/:version.Exam/random_problem');
//  GET  xx/api/v1/Exam/question/:type
Route::get('api/:version/Exam/question/:type', 'api/:version.Exam/get_question');
//  POST  xx/api/v1/Exam/question/
Route::post('api/:version/Exam/question/answer', 'api/:version.Exam/answer_question');
//  POST  xx/api/v1/Exam/question/
Route::post('api/:version/Exam/question/:type', 'api/:version.Exam/submit_question');


// 错题
//  GET  xx/api/v1/collection/question
Route::get('api/:version/Mistake/question', 'api/:version.Mistake/get_question');
//  POST  xx/api/v1/collection/question/answer
Route::post('api/:version/Mistake/question/answer', 'api/:version.Mistake/answer_question');
//  DELETE  xx/api/v1/collection/question/:id
Route::delete('api/:version/Mistake/question/:id', 'api/:version.Mistake/del_question');



